home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_name != "shipTICUS")
- {
- if(_currentframe == 1)
- {
- if(started == false)
- {
- _Y = _Y + yspeed;
- if(_Y > 100)
- {
- started = true;
- }
- }
- else
- {
- timer -= 1;
- if(timer <= 0 && lc._currentframe == 1)
- {
- timer = 40;
- duplicateMovieClip(_root.bulE,"enmBul" + _root.nmbr,16384 + _root.nmbr);
- _root["enmBul" + _root.nmbr]._x = _X - 20;
- _root["enmBul" + _root.nmbr]._y = _Y + 75;
- _root["enmBul" + _root.nmbr].xspeed = -3;
- _root["enmBul" + _root.nmbr].yspeed = 10;
- _root.nmbr = _root.nmbr + 1;
- duplicateMovieClip(_root.bulE,"enmBul" + _root.nmbr,16384 + _root.nmbr);
- _root["enmBul" + _root.nmbr]._x = _X + 20;
- _root["enmBul" + _root.nmbr]._y = _Y + 75;
- _root["enmBul" + _root.nmbr].xspeed = 3;
- _root["enmBul" + _root.nmbr].yspeed = 10;
- _root.nmbr = _root.nmbr + 1;
- }
- _X = _X + xspeed;
- if(_X > 460)
- {
- xspeed = -1 * speed;
- }
- if(_X < 90)
- {
- xspeed = speed;
- }
- pp = random(60);
- if(pp <= 1 && speed == 3)
- {
- lc.play();
- }
- if(pp == 2 && lc._currentframe == 1)
- {
- speed = 15;
- xspeed *= 2;
- tt = 50;
- }
- tt -= 1;
- if(tt <= 0)
- {
- speed = 3;
- }
- }
- var i = 0;
- while(i <= 20)
- {
- if(sh.harea.hitTest(_root["hmn" + i]))
- {
- life -= _root["hmn" + i].dmg;
- sh.play();
- removeMovieClip(_root["hmn" + i]);
- }
- if(lwing.hitTest(_root["hmn" + i]))
- {
- if(_root["hmn" + i].yspeed != 0)
- {
- _root["hmn" + i].xspeed = -1 * _root["hmn" + i].yspeed * 2;
- _root["hmn" + i].yspeed = 0;
- _root["hmn" + i]._rotation = -90;
- }
- }
- if(rwing.hitTest(_root["hmn" + i]))
- {
- if(_root["hmn" + i].yspeed != 0)
- {
- _root["hmn" + i].xspeed = _root["hmn" + i].yspeed * 2;
- _root["hmn" + i].yspeed = 0;
- _root["hmn" + i]._rotation = 90;
- }
- }
- i++;
- }
- if(_root.ship.sh.hitTest(sh.harea))
- {
- _root.ship.play();
- }
- if(_root.ship.sh.hitTest(lwing))
- {
- _root.ship.play();
- }
- if(_root.ship.sh.hitTest(rwing))
- {
- _root.ship.play();
- }
- if(_root.ship.sh.hitTest(lc.laz))
- {
- _root.ship.play();
- }
- if(life <= 0)
- {
- play();
- }
- }
- if(_root.rem == true)
- {
- removeMovieClip(this);
- }
- }
- }
-